The present invention relates to snapshots of a volume image in a computer system using a storage, and in particular, to a method of, and apparatus for, maintaining a plurality of snapshots taken at different point-in-times.
The snapshot function is a function of creating a point-in-time data image on a storage under operation when a snapshot is taken and making the point-in-time data image accessible by using means different from the storage under operation.
The use of the snapshot function makes it possible to readily access past image data by accessing to a point-in-time data image (hereinafter sometimes simply referred to as “snapshot”). Further, the use of the snapshot function also makes it possible to make a data backup by using snapshot data. Therefore, stop of updating of the volume, which is necessary for securing or freezing a to-be-backed-up file to make a data backup without snapshot function, becomes unnecessary, and an apparent backup window can be decreased.
Heretofore, the following methods have been used.    (1) There is a method of using a preservation storage area for preserving data obtained at the time of snapshot in order to maintain the snapshot. See, for example, U.S. Pat. No. 5,649,152.
If a snapshot of an operational volume is taken, then old data of a block that occurs thereafter and that is not yet updated is copied to the preservation storage area and a virtual volume for providing the snapshot is taken, at the time of update of the block.
As for reading from the virtual volume, if a block associated with an address to be read out has been already copied to the preservation storage area, the block is returned.
If the copy is not present in the preservation storage area, then an alteration has not occurred in the operational volume, and consequently a block associated with the same address in the operational volume is returned.
As for the volume image in the virtual volume, therefore, the volume image in the operational volume at the time of snapshot taking is maintained.    (2) In a file system in which update data and control data stored on the memory at fixed intervals are written to a disk additionally and states that are significant as the file system and called consistency points are left on the disk, there is a method for implementing the snapshot. See, for example, U.S. Pat. No. 5,819,292.
According to the method, a file system image at the time of snapshot taking is maintained by creating consistency points at the time of snapshot taking and securing the consistency points as the snapshot.    (3) For maintaining a plurality of snapshots, there is a method of individually preparing preservation storage areas. See, for example, U.S. Pat. No. 5,649,152.    (4) There is a method of implementing a snapshot of a dedicated file system. See, for example, U.S. Pat. No. 5,819,292. This method cannot be applied to the case where a file system using another implementation method is used, or applications such as a database that occupies and uses a volume.